<template>
	<view>
		<view class="popup" v-show="show">
			
					<view class="popup-info">
					<view style="text-align: center;">核销此订单</view>
					<view style="margin-top: 3vh;"></view>
					<view class="popup-text">请您仔细核对订单，此操作不可撤销</view>
					<view class="popup-text">请谨慎操作!</view>
					<view style="display: flex; width: 60%; margin: 3vh auto;">
						<button class="popup-btn" @tap="cancel" >取消</button>
						<button class="popup-btn" style="background-color: royalblue;color: white;" @tap="affirm">确认</button>
					</view>
				</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"popup",
		props:["show"],
		data() {
			return {
				close:false,
				sure:1,
			};
		},
		methods:{
					// 点击弹窗取消
					cancel() {
						this.sure=0;
						this.$emit("close",this.close,this.sure);
					},
					// 点击弹窗确认
					affirm() { 
						this.sure=1;
						this.$emit("close",this.close,this.sure);
					}
		}
	}
</script>

<style>
.popup {
	position: fixed;
	left: 0;
	right: 0;
	top: 0;
	height: 100vh;
	background-color: rgba(0,0,0,0.6);
	z-index: 9998;
}

.popup-info{
	position: fixed;
	width: 550upx;
	top: 50%;
	left: 50%;
	transform: translate(-50%,-50%);
	font-size: 30upx;
	padding: 40upx;
	border-radius: 20upx;
	background-color: #fff;
	z-index: 9999;
}
.popup-text{
	text-align: center;
	font-size: 20rpx;
	line-height: 3vh;
	
}
.popup-btn{
	width: 130rpx;
	height: 4vh;
	font-size: 20rpx;
	border-radius: 50rpx 50rpx 50rpx 50rpx;
	
}
</style>